﻿<%@ Page Language="vb" AutoEventWireup="false" MasterPageFile="~/naija.Master" CodeBehind="UsersStyle.aspx.vb" Inherits="WebApplication11.WebForm11" 
    title="Untitled Page" %>
 <script runat="server">

       Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
         If ProfileImage.HasFile = False Then
             FileUploadDetails.Text = "Please First Select a File to Upload"
         Else
             FileUploadDetails.Text = String.Format("Uploaded File: {0} <br/>""Congratulations Your Profile has been Updated <br/>" & _
                                               "Upload Size: (In Bytes):{1:N0)}<br/>" & _
                                               "Content-Type:{2}", ProfileImage.FileName, ProfileImage.FileBytes.Length, ProfileImage.PostedFile.ContentType)
            
             Image1.ImageUrl = "UsersStyles/" & User.Identity.Name & ".jpg"
         End If
       End Sub
</script> 
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<title>Users Share Styles</title>
    <link href="naija.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
        .style2
        {
            width: 101px;
        }
        .style3
        {
            width: 101px;
            height: 19px;
        }
        .style4
        {
            height: 19px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div>
       <div align="left" 
           
           style="font-family: Candara; font-size: large; font-weight: bolder; color: #FF0066; float: none; padding-right: 134px">
           Share Your Style<asp:LoginName ID="LoginName1" runat="server" 
               ForeColor="Black" />
           !</div>
       <div> 
           <table class="style1">
               <tr>
                   <td align="right" 
                       style="clip: rect(auto, 120px, auto, 120px)" 
                       class="style2">
                       <asp:Label ID="Label16" runat="server" Text="Category:"></asp:Label>
                   </td>
                   <td>
                       <asp:DropDownList ID="CatID" runat="server" 
                           DataSourceID="SqlDataSource1" DataTextField="CatID" DataValueField="ID">
                       </asp:DropDownList>
                       <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                           ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                           ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
                           SelectCommand="SELECT [ID], [CatName], [Descirption] FROM [Categories]">
                       </asp:SqlDataSource>
                   </td>
               </tr>
               <tr>
                   <td class="style2" align="right">
                       <asp:Label ID="Label17" runat="server" BorderStyle="None" Text="Style:" 
                           ToolTip="Select from dropdown menu your style type"></asp:Label>
                   </td>
                   <td>
                       <asp:DropDownList ID="DropDownList2" runat="server" 
                           DataSourceID="SqlDataSource2" DataTextField="StyleName" DataValueField="ID">
                       </asp:DropDownList>
                       <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
                           ConnectionString="<%$ ConnectionStrings:ConnectionString2 %>" 
                           ProviderName="<%$ ConnectionStrings:ConnectionString2.ProviderName %>" 
                           SelectCommand="SELECT [ID], [CategoryID], [StyleName], [Description] FROM [Style] WHERE ([CategoryID] = ?)">
                           <SelectParameters>
                               <asp:Parameter Name="CategoryID" Type="Int32" />
                           </SelectParameters>
                       </asp:SqlDataSource>
                   </td>
               </tr>
               <tr>
                   <td class="style2" align="right">
                       <asp:Label ID="Label11" runat="server" Text="Gender:"></asp:Label></td>
                   <td>
                       <asp:DropDownList ID="Gender" runat="server" 
                           DataSourceID="SqlDataSource3" DataTextField="GenderName" 
                           DataValueField="ID">
                       </asp:DropDownList>
                       <asp:SqlDataSource ID="SqlDataSource3" runat="server" 
                           ConnectionString="<%$ ConnectionStrings:ConnectionString3 %>" 
                           ProviderName="<%$ ConnectionStrings:ConnectionString3.ProviderName %>" 
                           SelectCommand="SELECT [ID], [GenderName] FROM [Gender]"></asp:SqlDataSource>
                   </td>
               </tr>
               <tr>
                   <td class="style2" align="right">
                       <asp:Label ID="Label13" runat="server" Text="Ethnic Group:"></asp:Label></td>
                   <td>
                       <asp:DropDownList ID="DropDownList4" runat="server" 
                           DataSourceID="SqlDataSource4" DataTextField="EthnicName" DataValueField="ID">
                       </asp:DropDownList>
                       <asp:SqlDataSource ID="SqlDataSource4" runat="server" 
                           ConnectionString="<%$ ConnectionStrings:ConnectionString4 %>" 
                           ProviderName="<%$ ConnectionStrings:ConnectionString4.ProviderName %>" 
                           SelectCommand="SELECT [ID], [EthnicName], [Description] FROM [Ethnic]">
                       </asp:SqlDataSource>
                   </td>
               </tr>
               <tr>
                   <td class="style2" align="right">
                       <asp:Label ID="Label14" runat="server" Text="Description:" 
                           ToolTip="Briefly describe your style"></asp:Label></td>
                   <td>
                       <asp:TextBox ID="TextBox5" runat="server" Height="26px" Width="377px"></asp:TextBox>
                   </td>
               </tr>
               <tr>
                   <td class="style3" align="right">
                       <asp:Label ID="Label18" runat="server" Text="Date:"></asp:Label>
                   </td>
                   <td class="style4">
                       <asp:Label ID="TodayDate" runat="server"></asp:Label>
                   </td>
               </tr>
               </table>
           <br />
</div>

    </div>
    <div ></div>
        <div class="AddPictures">
        <p style="color: #FF0066; font-weight: bolder; font-family: Candara; font-size: large;" 
                align="left">
            Upload a Picture</p>
        In this first step you will upload your photo. We suggest you follow a few easy
        tips to help your photo transmit your unique sense of style:
        <ol>
            <li><strong>Light!, light!!, light!!! You can never have enough light around you when
                you take your photo. If possible, take it outside during a sunny day.</strong></li>
            <li><strong>Take your photo in portrait orientation. That is, vertical, or up and down.
                This will allow your photo to appear larger.</strong></li>
            <li><strong>Take a number of photos from different angles and upload the photo that
                you think best represents the style message you are trying to present to the world.</strong></li>
        </ol>
        When you have decided on a photo to upload, click ‘Browse’ and locate the photo
        on your computer. The photo must be 10 megabytes or less in size and in jpg formats
    
    <div>
        
            
    </div>
    <div class=" ">
        <asp:Label ID="Label1" runat="server" Text="Picture Title: "></asp:Label>
        &nbsp;<asp:TextBox ID="tb_title" runat="server" Width="236px"></asp:TextBox>
        <br />
        <br />
        Select a file from your hard disk<br />
        <asp:FileUpload ID="ProfileImage" runat="server" />
        <br />
        <asp:Button ID="Button1" runat="server" Text="Submit" />
        
        <br />
        <asp:PlaceHolder ID="PlaceHolder1" runat="server">
            <asp:Image ID="Image1" runat="server" />
        </asp:PlaceHolder>
        
       <br /><asp:Label ID="FileUploadDetails" runat="server"></asp:Label>
    </div>
    </div>
</asp:Content>
